
<%@ page import="ch.vd.dec.selt.petale.TypologieAutorisation" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title><g:message code="typologieAutorisation.create" default="Create TypologieAutorisation" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir: '')}"><g:message code="home" default="Home" /></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="typologieAutorisation.list" default="TypologieAutorisation List" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="typologieAutorisation.create" default="Create TypologieAutorisation" /></h1>
            <g:if test="${flash.message}">
            <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
            </g:if>
            <g:hasErrors bean="${typologieAutorisationInstance}">
            <div class="errors">
                <g:renderErrors bean="${typologieAutorisationInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" >
				<g:hiddenField name="uniqueKey" value="${typologieAutorisationInstance?.uniqueKey}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="base"><g:message code="typologieAutorisation.base" default="Base" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: typologieAutorisationInstance, field: 'base', 'errors')}">
                                    <g:select 
										name="base.id" 
										from="${ch.vd.dec.selt.petale.BaseLegale.list()}" 
										optionKey="id" 
										value="${typologieAutorisationInstance?.base?.id}"  
									/>

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="aut"><g:message code="typologieAutorisation.aut" default="Aut" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: typologieAutorisationInstance, field: 'aut', 'errors')}">
                                    <g:select 
										name="aut.id" 
										from="${ch.vd.dec.selt.petale.TypeAutorisation.list()}" 
										optionKey="id" 
										value="${typologieAutorisationInstance?.aut?.id}"  
										noSelection="['null': '']" 
									/>

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cat"><g:message code="typologieAutorisation.cat" default="Cat" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: typologieAutorisationInstance, field: 'cat', 'errors')}">
                                    <g:select 
										name="cat.id" 
										from="${ch.vd.dec.selt.petale.Categorie.list()}" 
										optionKey="id" 
										value="${typologieAutorisationInstance?.cat?.id}"  
										noSelection="['null': '']" 
									/>

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="grp"><g:message code="typologieAutorisation.grp" default="Grp" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: typologieAutorisationInstance, field: 'grp', 'errors')}">
                                    <g:select 
										name="grp.id" 
										from="${ch.vd.dec.selt.petale.Groupe.list()}" 
										optionKey="id" 
										value="${typologieAutorisationInstance?.grp?.id}"  
										noSelection="['null': '']" 
									/>

                                </td>
                            </tr>
							
							<tr class="prop">
                                <td valign="top" class="name"><g:message code="typologieAutorisation.priorite" default="Priorite" />:</td>
                                
                                <td valign="top" class="value">${fieldValue(bean: typologieAutorisationInstance, field: "priorite")}</td>
                                
                            </tr>
                        
                            <!-- <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="priorite"><g:message code="typologieAutorisation.priorite" default="Priorite" />:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: typologieAutorisationInstance, field: 'priorite', 'errors')}">
                                    <g:textField name="priorite" value="${fieldValue(bean: typologieAutorisationInstance, field: 'priorite')}" />

                                </td>
                            </tr> -->
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'create', 'default': 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
